package cn.jinbyte.core.utils;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import org.babyfish.jimmer.sql.meta.UserIdGenerator;

public class SnowflakeIdGenerator implements UserIdGenerator<Long> {
    @Override
    public Long generate(Class<?> entityType) {
        Snowflake snowflake = IdUtil.getSnowflake();
        return snowflake.nextId();
    }
}
